package com.odyssey.player;

import org.anddev.andengine.entity.Entity;
import org.anddev.andengine.entity.sprite.AnimatedSprite;
import org.anddev.andengine.opengl.texture.region.TiledTextureRegion;
import org.anddev.andengine.sensor.accelerometer.AccelerometerData;
import org.anddev.andengine.entity.layer.tiled.tmx.TMXTile;
import org.anddev.andengine.entity.modifier.MoveXModifier;
import org.anddev.andengine.entity.modifier.MoveYModifier;

import java.util.Vector;

import com.odyssey.common.Direction;

import com.odyssey.common.Circle;
import com.odyssey.common.Coordinate;
import com.odyssey.common.Definitions;
import com.odyssey.enemies.Enemy;
import android.util.Log;

public class newPlayer extends Entity
{
	private TiledTextureRegion pTexture;
	private Coordinate pLoc;
	private Circle pCol;

	private AnimatedSprite pSprite;
	private float pTime;
	private Direction facing;
	private Direction oldFacing;
	private boolean alive;
	private boolean jump;
	private boolean fall;
	public boolean jumpSoundFlag;
	private int jumpsLeft;
	
	private void changeFacing(String dir)
	{
		
	}
	
	public void DirChange(AccelerometerData dat)
	{
	    if (dat.getX() > 1.5) {
	        changeFacing("RIGHT");
	      }
	    else if (dat.getX() < -1.5){
	        changeFacing("LEFT");
	      }
	    else {
	        changeFacing("FORWARD");
	      }
	}
}
